package main.java.DMDE.model.relationships;

import java.util.UUID;

import main.java.DMDE.model.Diagram;


public class FactoryRelationship {

	public static Relationship createEmpty(String relationshipType, Diagram diagram) {
		if(relationshipType.equals("Agregation"))
		    return new Agregation(diagram);
		if(relationshipType.equals("Association"))
		    return new Association(diagram);
		if(relationshipType.equals("Composition"))
		    return new Composition(diagram);
		if(relationshipType.equals("Inheritance"))
		    return new Inheritance(diagram);
		return null;
	}
	
    public static Relationship create(String relationshipType, Diagram diagram,UUID id) {
	if(relationshipType.equals("Agregation"))
	    return new Agregation(diagram,id);
	if(relationshipType.equals("Association"))
	    return new Association(diagram,id);
	if(relationshipType.equals("Composition"))
	    return new Composition(diagram,id);
	if(relationshipType.equals("Inheritance"))
	    return new Inheritance(diagram,id);
	return null;
    }

}
